package com.liuyi.netty.im.commons.codes.data.event.message.playload;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 视频类型消息载体
 *
 * @author Mr.Fmy
 * @since 2021-12-08
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class PlayloadVideo extends Playload implements Serializable {

    private static final long serialVersionUID = 1762151334832213698L;

    /**
     * 视频地址
     */
    private String videoUrl;

    @Override
    public String getText() {
        return "[视频]";
    }


    public static final class PlayloadVideoBuilder {
        private String videoUrl;

        private PlayloadVideoBuilder() {
        }

        public static PlayloadVideoBuilder aPlayloadVideo() {
            return new PlayloadVideoBuilder();
        }

        public PlayloadVideoBuilder videoUrl(String videoUrl) {
            this.videoUrl = videoUrl;
            return this;
        }

        public PlayloadVideo build() {
            PlayloadVideo playloadVideo = new PlayloadVideo();
            playloadVideo.setVideoUrl(videoUrl);
            return playloadVideo;
        }
    }
}
